<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script>
			// 月份
			let month = prompt("请输入月份");
			// 日
			let day = 13;

			let year = 2022;
			let fer = 28;
			if (year % 400 == 0 || (year % 4 == 0 && year % 100 != 0)) {
				fer = 29;
			}

			// 结果变量
			let sum = 0;
			switch (month - 1) {
				case 11: sum += 30;
				case 10: sum += 31;
				case 9: sum += 30;
				case 8: sum += 31;
				case 7: sum += 31;
				case 6: sum += 30;
				case 5: sum += 31;
				case 4: sum += 30;
				case 3: sum += 31;
				case 2: sum += fer;
				case 1: sum += 31;
			}
			alert("今天是第：" + sum + "天");
		</script>
	</body>
</html>
